import request from '@/http'
import config from '@/http/config'

const api = `${config.search.ip}/api/search`

/*
* 获取实施细则树形结构
* method： get
* params:{}
* dataSource-数据类型  fushen,waiguan,wuxiao,susong
* */
// export const getImplementationDetailsTree = (data) => request({
//   url:`${api}/other/getImplementationDetailsTree` ,
//   method:'get',
//   data
// })
export const getImplementationDetailsTree = (data) => request({
  url:`${api}/other/getImplementationDetailsTree` ,
  method:'get',
  params:data
})

/*
* 获取专利法树形结构
* method： get
* params:{}
* dataSource-数据类型  fushen,waiguan,wuxiao,susong
* */
export const getPatentLawTree = (data) => request({
  url:`${api}/other/getPatentLawTree` ,
  method:'get',
  params:data
})

// export const getPatentLawTree = (params) => request.get(`${api}/other/getPatentLawTree`, {
//   params
// })

/*
* 检索
* method： get
* params:{}
* keyWord:''
* dataSource-数据类型  fushen,waiguan,wuxiao,susong
* exp-表达式:xxx
* */
export const buildSearch = (data) => request({
  url:`${api}/evidence/buildSearch` ,
  method:'post',
  data
})


/*
* 法律问题检索-构建检索式接口
* method： get
* params:{}
* keyWord:''
* dataSource-数据类型  fushen,waiguan,wuxiao,susong
* exp-表达式:xxx
* */
export const lawBuildSearch = (data) => request({
  url:`${api}/law/buildSearch` ,
  method:'post',
  data  
})

/*
* 获取证据证明目的结构
* method： get
* params:{}
* dataSource-数据类型  fushen,waiguan,wuxiao,susong
* */
export const getZmmdTree = (data) => request({
  url:`${api}/other/getZmmdTree` ,
  method:'get',
  params:data  
})

